<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Payment extends MX_Controller {


	function __construct()
	{
		parent::__construct();
		$this->load->model('dump/master_model');
		$this->load->spark('ci-merchant');
	}

	function index(){
		
		
		$this->load->library('merchant');
		$this->merchant->load('paypal_pro');
		
			
		$settings = array(
				'username' => 'infolinematrix@gmail.com',
				'password' => 'Sudhya@0310',
				'signature' => 'infolicvvcvnematrix',
				'test_mode' => TRUE);
		
		
		
		$params = array(
				'amount' => 100.00,
				'currency' => 'USD',
				'return_url' => 'https://www.example.com/checkout',
				'cancel_url' => 'https://www.example.com/checkout',
				'paypal_url' => 'https://www.paypal.com/cgi-bin/webscr'); 
		
		
		$this->merchant->initialize($settings);
		$response = $this->merchant->purchase($params);
		
		
		
		var_dump($response);
		die("HE");
	}
}